import { RouterView, createRouter, createWebHashHistory } from 'vue-router'

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    { path: '/', redirect: '/home' },
    {
      path: '/home',
      component: () => import('./components/Home.vue'),
      redirect: '/home/main',
      children: [
        {
          path: 'main',
          component: () => import('./components/subcomponents/Main.vue')
        }
      ]
    },
    {
      path: '/settings',
      component: () => import('./components/Home.vue'),
      redirect: '/settings/userinfo',
      children: [
        {
          path: 'userinfo',
          component: () => import('./components/subcomponents/UserInfo.vue')
        },
        {
          path: 'userava',
          component: () => import('./components/subcomponents/UserAva.vue')
        },
        {
          path: 'userpsw',
          component: () => import('./components/subcomponents/UserPsw.vue')
        }
      ]
    }
  ]
})

export default router


